package jse;

import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;

public class TestIterator {
	public static void main(String[] args){ 
		Collection<String> eggs=new HashSet<String>();
		eggs.add("王维");
		eggs.add("李白");
		eggs.add("宋江");
		
		Iterator<String> it=eggs.iterator();
		while(it.hasNext()){
			String egg=it.next();
			System.out.println(egg);
		}
	}
}
